package com.bishe.demo.modules.hotel.hotel.controller;

import com.bishe.demo.modules.common.entity.ResultEntity;
import com.bishe.demo.modules.hotel.hotel.entity.Comment;
import com.bishe.demo.modules.hotel.hotel.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class CommentController {
    @Autowired
    private CommentService commentService;

    @PostMapping(value = "/comment", consumes = "application/json")
    public ResultEntity<Comment> insertComment(@RequestBody Comment comment) {
        return commentService.insertComment(comment);
    }
}
